package DBHelper;

import java.sql.Connection;
import java.sql.DriverManager;

public class DBHelper {static String DRIVER="net.sourceforge.jtds.jdbc.Driver";
    static String URL="jdbc:jtds:sqlserver://127.0.0.1:1433/shoppingDB";
    static {
        try {
            Class.forName(DRIVER);
        } catch (ClassNotFoundException e) {
            e.printStackTrace();
        }
    }
    public static Connection getCon() {
        Connection conn = null;
        try {
            conn = DriverManager.getConnection(URL,"sa","123456");
        } catch (Exception e) {
            e.printStackTrace();
        }
        return conn;
    }
}
